home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.20021006-20030409 / 000096_fdc@columbia.edu_Sat Nov 16 15:44:32 EST 2002.msg < prev    next >
Text File  |  2020-01-01  |  3KB  |  61 lines

  1. Article: 13862 of comp.protocols.kermit.misc
  2. Path: newsmaster.cc.columbia.edu!news.columbia.edu!news-not-for-mail
  3. From: fdc@columbia.edu (Frank da Cruz)
  4. Newsgroups: comp.os.linux.misc,comp.protocols.kermit.misc
  5. Subject: Re: recursive rm | wildcards | common file extension
  6. Date: 16 Nov 2002 15:43:33 -0500
  7. Organization: Columbia University
  8. Lines: 44
  9. Message-ID: <ar6all$djs$1@watsol.cc.columbia.edu>
  10. References: <3dd576c6.90242792@newsstand.cit.cornell.edu> <m265uyl2n6.fsf@mother.paradise.lost> <zexB9.839197$Ag2.28340611@news2.calgary.shaw.ca> <ar68n0$4g3$1@news.uni-stuttgart.de>
  11. NNTP-Posting-Host: watsol.cc.columbia.edu
  12. X-Trace: newsmaster.cc.columbia.edu 1037479415 18825 128.59.39.139 (16 Nov 2002 20:43:35 GMT)
  13. X-Complaints-To: postmaster@columbia.edu
  14. NNTP-Posting-Date: 16 Nov 2002 20:43:35 GMT
  15. Xref: newsmaster.cc.columbia.edu comp.os.linux.misc:571649 comp.protocols.kermit.misc:13862
  16.  
  17. In article <ar68n0$4g3$1@news.uni-stuttgart.de>,
  18. Hansjoerg Lipp  <hjlipp@web.de> wrote:
  19. : Richard Pitt wrote:
  20. : > I use
  21. : > find . -name "*.abc" -print | xargs rm -f
  22. : You should use
  23. : find . -name "*.abc" -print0 | xargs -0 rm -f
  24. : to prevent that file names with spaces are interpreted as several files 
  25. : by the xargs command.
  26. :
  27. As noted, you can delete files recursively using find, xargs, and rm --
  28. three programs, whose syntax and interactions might vary from one Unix
  29. version to another, and as you can see from this discussion, the details
  30. and quoting rules can be confusing.  The same thing can be done in a more
  31. straightforward way at the C-Kermit> prompt:
  32.  
  33.   delete /recursive *.abc
  34.  
  35. Plus you get a lot more options for selecting which files to delete:
  36.  
  37.   C-Kermit>delete ? File specification; or switch, one of the following:
  38.  
  39.    /after:         /except:        /nodotfiles     /not-before:    /summary
  40.    /ask            /heading        /noheading      /page           /tree
  41.    /before:        /larger-than:   /nolist         /recursive      /type:
  42.    /directories    /list           /nopage         /simulate
  43.    /dotfiles       /noask          /not-after:     /smaller-than:
  44.  
  45.   C-Kermit>delete
  46.  
  47. Dates, sizes, etc; whether to include or exclude dot files and directory
  48. files; exception lists; optional interactive prompting; various listing
  49. options.  Of particular interest is a simulation mode, allowing you to see
  50. which files WOULD be deleted without actually deleting them.  Another
  51. unique feature is the /TYPE:{TEXT,BINARY,ALL} option, which lets you pick
  52. only text files or only binary files for deletion (in addition to your
  53. other criteria).  C-Kermit is here:
  54.  
  55.   http://www.columbia.edu/kermit/ckermit.html
  56.  
  57. - Frank
  58.